package com.zhb.core.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
/**
 * @Title: MongoConfiguration.java 
 * @Package com.zzh.sys.configuration 
 * @Description: spring 整合mongodb的核心配置 
 * @author zhb
 * @date 2016年3月6日 下午8:01:16 
 * @version V1.0
 */
@Configuration
public class MongoConfig {
	@Autowired MongoDbFactory mongoDbFactory;
	public @Bean MongoTemplate mongoTemplate() throws Exception {
		return new MongoTemplate(mongoDbFactory);
	}
}